| SpinFS 2.5 Administration Reference | ||
|---|---|---|
| Prev | ||
This chapter discusses advanced tools that you can use to administer the SpinServer. The tools in this section require that you access the SpinServer with a Linux shell. The tools discussed here are not accessible via the SpinManager CLI or GUI. Use these tools only if you are familiar with Linux/UNIX shells.
The following advanced commands are available:
buildexports
spinauthcli
spinsh
vfsdump
vfsrestore
/usr/sbin/buildexports [-s server] [-hvV] [-g netgroup_file_name ...] rule_set_file_name...
The buildexports command reads one or more export file lists and creates or updates export lists based on the descriptions located in the file. See SpinAccess Export Rules Commands for a listing of CLI commands that can be used to work with export rule sets.
[-s server]
This specifies the server on which the command is to run. The default is localhost.
[-h]
This displays command usage.
[-v]
This specifies verbose output.
[-V]
This displays the version of the program.
[-g netgroup_file_name]
This specifies the name of a group definition file. The file must be in the standard Solaris netgroup(4) format, which is the same format displayed by the ypcat -k netgroup command. If groups are not included in the rule set file specified by the rule_set_file_name parameter, you do not need to use this option. You can specify multiple -g netgroup_file_name parameters to use multiple netgroup files.
rule_set_file_name
This specifies the name of a text file that contains export-list descriptions. You can specify multiple arguments to use multiple rule-set files. Blank lines and white space in the file are ignored, and the pound character (#) indicates a comment to the end of the current line. The file must contain lines of the following two forms:
ruleset name # Begins a rule set definition for name
rule host_or_group mask_bits RO_rule RW_rule # Adds a rule
In the rule line, the rule is specified as follows:
host_or_group specifies either a host (as a host name or IP address) or a netgroup prefixed with the at character (@). For instance, the expression @mygroup specifies a group called mygroup. If a netgroup is specified, a netgroup file name must be specified by using the -g parameter.
mask_bits specifies the number of mask bits in the rule. Possible values range from 0 to 32.
RO_rule specifies the read-only rule. Possible values include any, cifs-ntlm, cifs-kerberos, nfs-kerberos, and never. See spinaccess exportrule addrule for a description of these values.
RW_rule specifies the read-write rule. Possible values include any, cifs-ntlm, cifs-kerberos, nfs-kerberos, and never. See spinaccess exportrule addrule for a description of these values.
The following is an example of a rule-set file:
ruleset englab-only
rule @englab 16 any any # read-write for hosts in @englab
rule 0.0.0.0 0 any never # rest of world read-only
ruleset webserver-config
rule webmaster-pc.it.example.com 32 any nfs-kerberos
# no access for anyone else
The following example creates or updates export rule sets contained in two rule-set files named /tmp/englab.rules and /tmp/external.rules. No group definition files are specified.
# /usr/sbin/buildexports /tmp/englab.rules /tmp/external.rules
The spinauthcli command sets up SpinAuth credentials between an NFS client and a SpinServer. The command is run on the client, not on the SpinServer. The command must be compiled for your client platform. Network Appliance can supply you with precompiled spinauthcli binaries for your client platform upon request; contact your Network Appliance representative for more information. See the Administration Guide for additional details about using SpinAuth.
[-h]
This displays help information for the command.
[-i]
This queries the credential's lifetime.
[-d]
This destroys the credential.
[-q]
This specifies that the command runs in quiet mode.
The following example sets up SpinAuth credentials for a client on a SpinServer named Server1.data.example.com
% spinauthcli Server1.data.example.com
The spinsh command runs one or more SpinManager CLI commands in a shell. It can be used in shell scripts to perform SpinManager operations.
[-e]
This specifies that the spinsh command abort if any of the commands issued under it fail. This option is used only in batch mode.
[-h]
This displays command usage.
[-t]
This displays the execution time, in seconds, of the command after the command is run.
[-v]
This displays all fields in show commands.
[-y]
This disables any confirmation messages associated with commands that are run under the spinsh command.
-c command
This specifies a single CLI command to run, after which the spinsh command exits.
The following example runs the CLI system software show command, then exits.
# /bin/spinsh -c system software show
/sbin/vfsdump [-h] [-s spinserver] [-l previous_label] [-n] [-c] [-t timeout_value] [-o [output_file]] VFS_name
The vfsdump command writes the contents of a VFS to standard output or a specified output file.
[-h]
This displays help information for the command.
[-s spinserver]
This specifies the name or IP address of a SpinServer in the cluster in which the source VFS is located. The default value is 127.0.0.1.
[-l previous_label]
This specifies the label of a previous dump file for an incremental dump.
[-n]
This specifies that if the source VFS is a read-write VFS, the SpinServer does not first create a SpinShot of the source VFS.
[-c]
This specifies that a clone is created on the client before a dump of a read-write VFS is created.
[-t timeout_value]
This specifies the connection timeout value, in seconds. The default is 3 seconds.
[-o [output_file]]
This specifies the location to which dump output is directed. By default, dump output goes to STDOUT. If the parameter is specified without an output_file name, the current dump's label is used as the name of the output file.
VFS_name
This specifies the name of the VFS whose contents are to be dumped.
The following example creates a dump of a VFS named dept.eng from a SpinServer with the IP address 127.32.16.1 to an output file named /tmp/dept.eng.
# /sbin/vfsdump -s 127.32.16.1 -o /tmp/dept.eng dept.eng
/sbin/vfsrestore [-h] [-s spinserver] [-i input_file] [-f] [-t timeout_value] [-p storage_pool_name] [-v virtual_server_name] VFS_name
[-h]
This displays help information for the command.
[-s spinserver]
This specifies the name or IP address of the SpinServer on which the restored VFS is to be located. The default value is 127.0.0.1.
[-i input_file]
This specifies the name of a file from which dump data is to be restored. By default, input is read from standard input (STDIN).
[-f]
This specifies that data is to be forcibly restored if the specified dump file is out of sequence.
[-t timeout_value]
This specifies the connection timeout value, in seconds. The default is 3 seconds.
[-p storage_pool_name]
This specifies the name of the storage pool on which the restored VFS is to be created. Specify this parameter and the -v parameter only if a new VFS needs to be created to hold the restored data.
[-v virtual_server_name]
This specifies the name of the virtual server on which the restored VFS is to be created. Specify this parameter and the -p parameter only if a new VFS needs to be created to hold the restored data.
VFS_name
This specifies the name of the VFS to which dump data is to be restroed. If necessary, this VFS is created by the command.
The following example restores data to a SpinServer with the IP address 127.32.17.1 from a dump file /tmp/dept.eng:1:5000. Data is restored to a VFS named new.vfs, which is created on a storage pool named pool2 and a virtual server named vs2.
# /sbin/vfsrestore -s 127.32.17.1 -i /tmp/dept.eng:1:5000 -p pool2 -v vs2 new.vfs
Copyright © 2004 Network Appliance, Inc.; copyright © 2003, 2004 Spinnaker Networks, LLC. All rights reserved. Specifications subject to change without notice.